create_fect_tab <- function(est_main, est_placebo, filename) {
  require(here)
  att.tab <-
    rbind(
      est_main$est.avg,
      est_main$est.avg.unit,
      est_main$est.beta,
      est_placebo$est.placebo[,c(1:5)]
    )
  colnames(att.tab) <- c("Estimate", "S.E.", "CI$_{2.5\\%}$", "CI$_{97.5\\%}$", "$p$-value")
  rownames(att.tab) <- c("Observations equally weighted", "Units equally weighted",
                         "Hydraulic Fracturing Employment",
                         "-2 to 0 election interval")
  kbl(att.tab, booktabs=TRUE, digits = 2, linesep = "",
      escape = FALSE, format="latex") %>%
    group_rows("ATT:", 1, 2) %>%
    group_rows("Covariates:", 3, 3) %>%
    group_rows("Placebo Tests:", 4, 4) %>%
    cat(., file = paste0(here("output", "tables"), filename))
}
